﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.CompilerServices;
using System.Text;

namespace MishraReader.ViewModels
{

    public abstract class TaskViewModelBase : ViewModelBase
    {

     
        private bool _isBusy;


        private bool _isDisposed;


        /// <summary>
        ///   Gets the IsBusy property.
        /// </summary>
        public virtual bool IsBusy
        {
            get { return _isBusy; }
            set
            {
                Set(ref _isBusy, value);
            }
        }

        /// <summary>
        ///   Returns true if the object is disposed
        /// </summary>
        public bool IsDisposed
        {
            get { return _isDisposed; }
            private
                set
            {
                if (_isDisposed == value)
                    return;
                _isDisposed = value;
            }
        }


        /// <summary>
        ///   Cleanup
        /// </summary>
        public override void Cleanup()
        {
            IsDisposed = true;
            base.Cleanup();
        }
    }
}